package com.restaurantonlineorder.buyer.feignclients;

import com.restaurantonlineorder.buyer.vo.reps.OrderRespVo;
import com.restaurantonlineorder.buyer.vo.req.OrderReqVo;
import com.restaurantonlineorder.response.BaseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author 熊宇
 * @date 2022/7/24 15:19
 * @description 订单调用feign接口
 */
@FeignClient(value = "restaurantonlineorder-seller", path = "/seller/order")
public interface OrderFeignService {
    /**
     * 生成订单
     *
     * @param orderReqVo
     * @return
     */
    @PostMapping("/generate-order")
    BaseResult generateOrder(@RequestBody OrderReqVo orderReqVo);


    /**
     * 查看订单
     *
     * @param id
     * @return
     */
    @GetMapping("/order")
    BaseResult<OrderRespVo> queryOrder(@RequestParam("id") Long id);
}
